// 政策兑付主表
const {DataTypes, db } = require("../db");
db.define('sendDf', {
id: {type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true,comment:'表自增ID'},
tenantId:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
tempId:{type: DataTypes.STRING(64),comment:'临时ID'}, 
billDate:{type: DataTypes.STRING(10),allowNull:false,comment:'兑付时间'}, 
beginDate:{type: DataTypes.STRING(10),allowNull:false,comment:'开始日期'}, 
endDate:{type: DataTypes.STRING(10),allowNull:false,comment:'结束日期'}, 
buId:{type: DataTypes.INTEGER,comment:'往来单位ID'}, 
brandId:{type: DataTypes.INTEGER,comment:'品牌ID'}, 
invId:{type: DataTypes.INTEGER,comment:'商品ID'}, 
sendType:{type: DataTypes.STRING(255),comment:'赠品类型'}, 
dfType:{type: DataTypes.STRING(255),comment:'兑付类型 转预付|转其他收入'}, 
accId:{type: DataTypes.INTEGER,comment:'转其他收入账户'}, 
amount:{type: DataTypes.DECIMAL(18, 2),comment:'转金额'}, 
billState:{type: DataTypes.STRING(20),defaultValue:('draft'),comment:'draft|accounted'}, 
yfId:{type: DataTypes.INTEGER,comment:'转预付票据的ID'}, 
bak5:{type: DataTypes.STRING(255),comment:''}, 
cby:{type: DataTypes.INTEGER,comment:''}, 
createdAt:{type: DataTypes.STRING(20),comment:''}, 

}, {
    tableName: 'send_df',
    timestamps: false,
    comment: '政策兑付主表',
    
});